<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="lib/widgets.xsl" />
<xsl:output method="html" encoding="utf-8"/>

<xsl:template match="/" name="userData">
<form id="form1" name="form1" method="post" action="index.php">
	<table>
	<caption>korisnik:</caption>
	<tr>
		<th scope="row">
			id</th>
		<td>
		  <input type="text" size="8" readonly="true">
		    <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">id</xsl:with-param>
        </xsl:call-template>
		  </input>
		</td>
	  <td rowspan="6"><div class="slika"><img src="../xslt/img/Slika012.jpg" alt="slika" height="170" /></div></td>
	</tr>
	<tr>
		<th scope="row">login</th>
		<td>
      <input type="text">
        <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">login</xsl:with-param>
        </xsl:call-template>
      </input>		
		</td>
	  </tr>

	<tr>
		<th scope="row">first name</th>
		<td>
      <input type="text">
        <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">fname</xsl:with-param>
        </xsl:call-template>
      </input>
		</td>
	  </tr>
	<tr>
		<th scope="row">last name</th>
		<td>
      <input type="text">
        <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">lname</xsl:with-param>
        </xsl:call-template>
      </input>    
    </td>
	  </tr>
	<tr>
		<th scope="row">password</th>
		<td>
      <input type="text">
        <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">password</xsl:with-param>
        </xsl:call-template>
      </input>    		
		</td>
	  </tr>
	<tr>
    <th scope="row">status</th>
	  <td>
	   <select>
        <xsl:call-template name="bee_php_option">
          <xsl:with-param name="id">staatus</xsl:with-param>
        </xsl:call-template>    
	   </select>  
    </td>
	</tr>
	<tr>
    <th scope="row">last login time</th>
	  <td> 	   
	    <label>
        <xsl:call-template name="bee_php_label">
          <xsl:with-param name="id">llDate</xsl:with-param>
        </xsl:call-template>    	    
	    </label>
	  </td>	  
	  </tr>
	<xsl:if test="/form/variables/sys_kom_filter ='0'" ></xsl:if>
	<tr>
		<th scope="row">region</th>
		<td>     
		  <select>
        <xsl:call-template name="bee_php_option">
          <xsl:with-param name="id">region</xsl:with-param>
        </xsl:call-template>               
      </select>
		</td>
	  </tr>
	<tr>
		<th scope="row">sector</th>
		<td>
      <select>
        <xsl:call-template name="bee_php_option">
          <xsl:with-param name="id">sector</xsl:with-param>
        </xsl:call-template>               
      </select>
    </td>
	  <td><div align="center">picture</div></td>
	</tr>
		<xsl:if test="number(form/variables/sys_kom_filter)=0">
	<tr>
		<th scope="row">view rights</th>
		<td colspan="2">
      <select>
        <xsl:call-template name="bee_php_option">
          <xsl:with-param name="id">view_rights</xsl:with-param>
        </xsl:call-template>               
      </select>
    </td>
	</tr>
	<tr>
    <th scope="row">customer</th>
	  <td>
      <select>
        <xsl:call-template name="bee_php_option">
          <xsl:with-param name="id">customer</xsl:with-param>
        </xsl:call-template>               
      </select>	  
	  </td>
	  <td>&nbsp;</td>
	  </tr>
	</xsl:if>
	<tr>
    <th scope="row">description</th>
	  <td colspan="2">
	    <textarea cols="50" rows="4">
        <xsl:call-template name="bee_php_inputarea">
          <xsl:with-param name="id">description</xsl:with-param>
        </xsl:call-template>               	  
	    </textarea></td>
	</tr>
	<tr>
    <th scope="row">town</th>
	  <td colspan="2">
      <input type="text"  size="32" maxlength="32">
        <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">city</xsl:with-param>
        </xsl:call-template>
      </input>    	  
	  </td>
	  </tr>
	<tr>
    <th scope="row">address</th>
	  <td colspan="2">
      <input type="text"  size="32" maxlength="32">
        <xsl:call-template name="bee_php_input">
          <xsl:with-param name="id">address</xsl:with-param>
        </xsl:call-template>
      </input>
    </td>
	</tr>
	<tr>
		<td scope="row">&nbsp;</td>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<th colspan="3" scope="row"><div align="right">
		  <xsl:choose>
				<xsl:when test="form/rowData/bee_user/id = ''">
				  <input name="sys_action=add" type="submit" id="sys_action_add" value="Add" />
				</xsl:when>
				<xsl:otherwise>
				<input name="sys_action=update" type="submit" class="gumb" id="sys_action_update" value="Change" />
				</xsl:otherwise></xsl:choose>
		</div></th>
		</tr>
</table><xsl:if test="1=0">
	<p><a href="index.php?__form=generateSetup&amp;id={form/rowData/bee_user/id}&amp;__frm_back=korisnik&amp;__noload=true">generate client setup</a> <br />
	</p>
  </xsl:if>
</form>

	<table cellspacing="10">
	<tr>
		<td style="vertical-align:top"><form name="form2" method="post" action="index.php">
		<xsl:if test="form/variables/manage_permissions=1 and form/rowData/bee_user/id != ''" >
		<table cellspacing="3">
			<caption>
				groups
				</caption>
			<tr>
				<th scope="col">name</th> 
				<th scope="col">description</th>
			</tr>
			<xsl:for-each select="form/tables/grupa/row">
				<tr>
					<td><xsl:value-of select="name"/></td>
					<td><xsl:value-of select="description"/></td>
					<td><input name="group[]" type="checkbox" value="{id}">
							<xsl:if test="checked='true'">
								<xsl:attribute name="checked" >checked</xsl:attribute>
							</xsl:if>
						</input>					</td>
				</tr>
			</xsl:for-each>
			<tr>
				<th colspan="3"><div align="right">
						<input name="id" type="hidden" id="u2" value="{form/rowData/bee_user/id}" />
						<input name="sys_action=permit" type="submit" id="sys_action_permit" value="Change" />
				</div></th>
			</tr>
		</table>
		</xsl:if>
		</form>
		</td>
		<td style="vertical-align:top"><form name="form3" method="post" action="index.php">
      <xsl:if test="form/variables/manage_limits=1" >
				<table cellspacing="3">
					<caption>
						limits
						</caption>
					<tr>
						<th scope="col">name</th>
						<th scope="col">description</th>
					</tr>
					<xsl:for-each select="form/tables/limit/row">
						<tr>
							<td><xsl:value-of select="naziv"/></td>
							<td><xsl:value-of select="opis"/></td>
							<td><input name="limit[]" type="checkbox" value="{id}"><xsl:if test="checked='true'">
										<xsl:attribute name="checked" >checked</xsl:attribute>
									</xsl:if></input>
							</td>
						</tr>
					</xsl:for-each>
					<tr>
						<th colspan="3"><div align="right">
								<input name="id" type="hidden" id="id2" value="{form/rowData/bee_user/id}" />
								<input name="sys_action=limit" type="submit" id="sys_action_limit" value="Change" />
						</div></th>
					</tr>
				</table>
				</xsl:if>
			</form>
		</td>
	</tr>
</table>

	<br />
</xsl:template>
</xsl:stylesheet>